#include "co_async/debug.hpp"
#include <liburing.h>
#include <unistd.h>

int main() {
  io_uring ring;
  io_uring_queue_init(32, &ring, 0);
  io_uring_sqe *sqe = _io_uring_get_sqe(&ring);

  char buf[10];
  io_uring_prep_read(sqe, STDIN_FILENO, buf, 10, 0);
  io_uring_sqe_set_data64(sqe, 0x2a);
  io_uring_submit(&ring);

  io_uring_cqe *cqe;
  io_uring_wait_cqe(&ring, &cqe);
  debug(), cqe->res;
  debug(), cqe->user_data;

  io_uring_cqe_seen(&ring, cqe);

  debug(), buf;
  io_uring_queue_exit(&ring);
  return 0;
}
